# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=pextractor
pkgver=0.18b
pkgrel=5
groups=('blackarch' 'blackarch-windows' 'blackarch-forensic' 'blackarch-binary')
pkgdesc='A forensics tool that can extract all files from an executable file created by a joiner or similar.'
arch=('any')
url='http://packetstormsecurity.com/files/62977/PExtractor_v0.18b_binary_and_src.rar.html'
license=('custom:unknown')
makedepends=('unrar')
noextract=("PExtractor_v${pkgver}_binary_and_src.rar")
source=("https://dl.packetstormsecurity.net/forensics/PExtractor_v${pkgver}_binary_and_src.rar")
sha512sums=('9dc895d8083cc744971575aaad54c83fb83f34f1bbe7a25bb56e7c9215e90081629f9ed331f4910595dbb636d956cc6eb5fdbeeb2833b4e1cd77841e2e57adc1')

package() {
  install -dm 755 "$pkgdir/usr/share/windows/$pkgname"

  unrar x "PExtractor_v${pkgver}_binary_and_src.rar" &&
    rm PExtractor_v${pkgver}_binary_and_src.rar

  cp -a * "$pkgdir/usr/share/windows/$pkgname"
}

